let util = {};
util.dateFormatter = (val) => {
  let date = new Date(val)
  let pad2 = function (n) { return n < 10 ? '0' + n : n }
  return date.getFullYear().toString() + '-' + pad2(date.getMonth() + 1) + '-' + pad2(date.getDate()) + ' ' + pad2(date.getHours()) + ':' + pad2(date.getMinutes()) + ':' + pad2(date.getSeconds())
}

export default util